package com.example.parkdemo.adapter

import com.bumptech.glide.Glide
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.example.base.mvvm.BaseViewModel
import com.example.parkdemo.R

class CaeImagAdapter : BaseQuickAdapter<String, BaseViewHolder>(R.layout.item_car_img) {
    override fun convert(holder: BaseViewHolder, item: String) {
        if (item == "+") {
            holder.setImageResource(R.id.item_car_img_iv, R.drawable.baseline_add_24)
        } else {
            Glide.with(context).load(item).into(holder.getView(R.id.item_car_img_iv))
        }
    }
}